package com.parent.child;

public class Sepecific implements IAnimalable {
	IAnimalable mAnimalable;

	public void eat(IAnimalable animalable) {
		if (animalable == null) {
			return;
		}
		mAnimalable = animalable;
		mAnimalable.init();
		mAnimalable.doWork();
		mAnimalable.close();
	}
	public String getResult(){
		return result;
	}
	String result;
	public void setResult(String result){
		this.result=result;
	}

	@Override
	public void init() {
		System.out.println("Sepecific init");

	}

	@Override
	public void doWork() {
		System.out.println("Sepecific doWork");

	}

	@Override
	public void close() {
		System.out.println("Sepecific close");
	}

}
